Add manual Cloud Run deploy dispatch - #112
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e347ef9b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| on: | ||
| push: | ||
| branches: [ main ] | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Restrict manual deploys to main
Adding an unrestricted workflow_dispatch lets an operator manually run this production deploy workflow from any selectable ref, while the job later builds and deploys ${GITHUB_SHA} to the fixed Cloud Run project/service. In the scenario where a feature branch or tag is selected in the Run workflow UI/CLI, this bypasses the previous push-only-on-main constraint and can deploy unmerged code; add a job-level guard such as github.ref == 'refs/heads/main' or otherwise validate the ref before checkout/deploy.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e347ef9b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| on: | ||
| push: | ||
| branches: [ main ] | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Restrict manual deploys to main
With workflow_dispatch enabled here, anyone with permission to run the workflow can choose a non-main ref for the manual run, and this job has no later github.ref guard before actions/checkout, docker build, and gcloud run deploy. In that scenario the selected branch's code is built and deployed to Cloud Run even though the previous deploy trigger was limited to pushes on main, so a feature branch can bypass the normal merge path into production.
Useful? React with 👍 / 👎.
Summary\n- allow the Cloud Run deploy workflow to be triggered manually from GitHub Actions\n\n## Validation\n- git diff --check\n- npx --yes prettier@3.3.3 --check .github/workflows/sync-cloud-run-env.yml (existing formatting warnings only)